<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Sritel Portal</title>
</head>
<body>

<h2>Service Activation Page</h2>
<br />
<b>These are the all services available</b>
<table>
	<c:forEach var="service" items="${services}">
		<tr>
			<td><c:out value="${service.id}" /></td>
			<td><c:out value="${service.name}" /></td>
			<td><c:out value="${service.description}" /></td>
		</tr>
	</c:forEach>
</table>

--------------------------------------------------
<c:choose>
	<c:when test="${!empty subscribedServices}">
		<b>Services you have activated</b>
		<table>
			<c:forEach var="subscribedService" items="${subscribedServices}">
				<tr>
					<td><c:out value="${subscribedService.id}" /></td>
					<td><c:out value="${subscribedService.serviceId.name}" /></td>
					<td><c:out value="${subscribedService.serviceId.description}" /></td>
				</tr>
			</c:forEach>
		</table>
	</c:when>
	<c:otherwise>
		<b>These are no services activated</b>
	</c:otherwise>
</c:choose>

<form action="activateServices" method="post">
	<input type="text" name="serviceId"  />
	<input type="submit" value="Activate this service"  />
</form>

</body>
</html>